#include <iostream>
using namespace std;
int main()
{
	char s[1000];
	int count=0;
	cin>>s;
	for(int i=0;s[i]!='\0';i++)
	{
		if(s[i]=='#')
			count++;
	}
	cout<<count;
	return 0;
}